package com.ruoyi.cart.remote.factory;

import com.ruoyi.cart.remote.IPmsCartRemoteService;
import com.ruoyi.common.core.domain.Result;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author lemon
 * @date 2024/12/29 16:34
 **/
@Component
public class PmsCartRemoteFallbackFactory implements FallbackFactory<IPmsCartRemoteService> {
    @Override
    public IPmsCartRemoteService create(Throwable cause) {
        return new IPmsCartRemoteService() {
            @Override
            public Result removePayed(Long[] skuIds) {
                return Result.error("调用失败");
            }
        };
    }
}
